1. Field of the Invention
The invention relates generally to digital controllers for controlling industrial machines and processes, and more particularly, to programmable controllers.
2. Description of the Prior Art
In the simplest system architecture for a programmable controller, the controller includes a processor module and several I/O modules which are supported in the same equipment rack and electrically connected through a backplane circuit board. The processor executes an I/O scan to read input status data from input modules and to transmit output status data to the output modules. The input status data represents the state (such as "on" or "off") of input devices on the equipment being controlled while the output status data represents the state (such as "on" or "off") which is signalled to the output devices on the equipment being controlled. The processor also executes a program scan in which user program instructions are executed to examine the input status data and to set the output status data according to the logic contained in the program instructions.
In a system with a single rack and a processor located in the rack, the time between the sensing of input devices and the setting of output devices is relatively short. In larger systems, both the I/O scan and the program scan require more time.
In the system architecture shown and described in Schultz et al., U.S. Pat. No. 4,413,319, issued Nov. 1, 1983, a programmable controller includes a stand-alone main processor and a number cf "remote" I/O racks strung out along serial communication channels. The scanner module in the Schultz et al. patent sends I/O status data to adapter I/O modules residing in remote I/O racks. The data passes through the adapter modules to the I/O modules, the adapter modules being transparent to the exchange between the scanner module and the I/O modules.
In the Schultz system neither the adapter modules nor the I/O modules possess the ability to execute a control program to alter the I/O status data, which is a characteristic of the main processor. Because I/O status data must be sent back and forth to the main processor unit for execution of the control program, system response time is a function of the number of I/O points in the system, and of length of the control program in the main processor unit.
There is a need for programmable controller equipment that is suitable for high-speed manufacturing systems such as bottling and canning, sorting of material on conveyors, presence sensing of fast moving objects and counting material flow. Prior equipment has not been suitable, particularly due to the length of the I/O scan or update time for the output devices.
The invention relates to a method and to circuitry for providing closed-loop digital control of high speed equipment. Instructions are received by an I/O module from a processor-based program node and related to other instructions on the I/O module that control the state of an output in response to signals from a plurality of inputs.
Preferably, the instructions received by the I/O module are in a higher-level language. These instructions are translated into a data structure that relates commanded states for selected outputs on the I/O module to the logical states of the inputs on the I/O module. After translating these higher-level instructions, a group of lower level instructions is executed to control the outputs in response to signals from the inputs according to the commanded states in the data structure.
The data structure may take the form of several tables which control the "on" and "off" states of the outputs according to the logic of the higher-level instructions. The tables combine the various functions of the higher-level instructions.
The circuitry of the invention is incorporated in the I/O module. This includes circuitry for receiving a program downloaded from a controller processor, for example, and circuitry for communicating the program to a storage circuit. It may also include a processor for translating the instructions in the higher-level language to a data structure that relates the state of outputs on the I/O module to the state of the inputs on the I/O module. The processor reads the logical states for the outputs in response to logical states generated from the inputs to close a control loop from the inputs to the outputs of the I/O module.
The I/O logic module can be inserted into an equipment rack and connected to a rack backplane to receive a user control program downloaded from the main processor. While real-time control is being handled at the I/O interface, status data is periodically returned to the PC main processor unit which maintains general supervision and monitoring of the full programmable controller system. The main processor unit may also be performing real-time control of devices on a controlled system that are less time-sensitive than those controlled by the circuitry of the invention.
One object of the invention is to receive, translate and execute user programs which operate according to Boolean logic incorporated in ladder diagram programs of the type used in programmable controllers.
Another object of the invention is to receive, translate and execute user programs which operate according to a state transition function.
Another object of the invention is to enable on-line replacement of one user program with a newly downloaded user program. This is accomplished with special programming instructions for stopping execution of the previous program and starting execution of the new program after it has been translated.
Another object of the invention is to download user programs in a single file for faster implementation of the program and for maintenance of data integrity within the program.
These and other objects and advantages of the invention will become apparent from the following description in which reference is made to the accompanying drawings and to the appendices, which form a part hereof, and in which there is illustrated by way of example, two examples of a preferred embodiment of the invention. These examples do not necessarily represent the full scope of the invention, however, and reference is made to the claims that follow the description for determining the various embodiments that come within the scope of the invention.